app.service("itemCatService",function ($http) {

    //分页查询
    this.search = function (pageNum,pageSize,pid) {
       return $http.post("../itemCat/findPageBypid.do?pageNum="+pageNum+"&pageSize="+pageSize+"&pid="+pid);
    }
   this.deletes=function (ids) {
       return $http.post("../itemCat/deletes.do",ids);
   }
   this.save=function (pid,entity){
       return $http.post("../itemCat/save.do?pid="+pid,entity);
   }
   this.findOne=function (id) {
       return $http.post("../itemCat/findOne.do?id="+id);
   }
   this.findItemByPid=function (pid) {
        return $http.post("../itemCat/findItemByPid.do?pid="+pid);
   }
   this.findAll=function () {
       return $http.post("../itemCat/findAll.do");
   }
})